#
#  $Id$
#

@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@

H_PIECES=chain console clockdrv iosupp ringbuf \
   spurious timerdrv vmeintr
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)

SYS_H_PIECES=termios
SYS_H_FILES=$(SYS_H_PIECES:%=$(srcdir)/sys/%.h)

MOTOROLA_H_PIECES=mc68230 mc68681
MOTOROLA_H_FILES=$(MOTOROLA_H_PIECES:%=$(srcdir)/motorola/%.h)

ZILOG_H_PIECES=z8036 z8530 z8536
ZILOG_H_FILES=$(ZILOG_H_PIECES:%=$(srcdir)/zilog/%.h)

RTEMSCPLUSPLUS_H_PIECES= rtemsEvent rtemsInterrupt rtemsMessageQueue \
  rtemsSemaphore rtemsStatusCode rtemsTask rtemsTaskMode rtemsTimer
RTEMSCPLUSPLUS_H_FILES=$(RTEMSCPLUSPLUS_H_PIECES:%=$(srcdir)/rtems++/%.h)

SRCS=$(H_FILES) $(SYS_H_FILES) \
     $(MOTOROLA_H_FILES) $(RTEMSCPLUSPLUS_H_FILES)

include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=

all:	$(SRCS)
	$(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
	$(INSTALL) -m 444 $(SYS_H_FILES) $(PROJECT_INCLUDE)/sys
	$(INSTALL) -m 444 $(MOTOROLA_H_FILES) \
            $(PROJECT_INCLUDE)/motorola
	$(INSTALL) -m 444 $(ZILOG_H_FILES) $(PROJECT_INCLUDE)/zilog
ifeq ($(HAS_CPLUSPLUS),yes)
	$(INSTALL) -m 444 $(RTEMSCPLUSPLUS_H_FILES) $(PROJECT_INCLUDE)/rtems++
endif
